import { lazy } from "react";
import {
    AppstoreOutlined,
    MenuUnfoldOutlined,
    MenuFoldOutlined,
    PieChartOutlined,
    DesktopOutlined,
    ContainerOutlined,
    MailOutlined,
  } from '@ant-design/icons'
export let mainRouter = [
    {
        path:"/index/tableList",
        element:lazy(()=>import("../components/TableList")),
        title:"表格",
        key:1,
        icon:<AppstoreOutlined/>
    },
    {
        path:"/index/order",
        element:lazy(()=>import("../components/Order")),
        title:"订单",
        key:2,
        icon:<MenuUnfoldOutlined/>
    },
    {
        path:"/index/home",
        element:lazy(()=>import("../components/Home")),
        title:"首页",
        key:3,
        icon:<MenuFoldOutlined/>
    },
    {
        path:"/index/shop",
        element:lazy(()=>import("../components/Shop")),
        title:"购物",
        key:4,
        icon:<PieChartOutlined/>
    }
]

const routes = [ 
    {
        from:"/",
        to:"/index/tableList"
    },
    {
        path:"*",
        element:lazy(()=>import("../page/Eorry"))
    },
    {
        path:"/Login",
        element:lazy(()=>import("../page/Login"))
    },
    {
        path:"/index",
        element:lazy(()=>import("../page/Index")),
        children:mainRouter
    }
]

export default routes